-- GENERATED SPELL FOR [Bog Overlord] --


function spell0_21694(pUnit, Event) --@Disease Cloud,Self--
pUnit:FullCastSpellOnTarget(37266,pUnit)
pUnit:RegisterEvent('Sorts_21694', 0, 1)
end

function spell1_21694(pUnit, Event) --@Disease Cloud,Self--
pUnit:FullCastSpellOnTarget(37863,pUnit)
pUnit:RegisterEvent('Sorts_21694', 0, 1)
end

function spell2_21694(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_21694', 605, 1)
end

function spell3_21694(pUnit, Event) --@Fungal Decay,n/a--
pUnit:FullCastSpellOnTarget(32065,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21694', 18000, 1)
end

function spell4_21694(pUnit, Event) --@Poison Bolt,n/a--
pUnit:FullCastSpellOnTarget(37272,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21694', 10000, 1)
end

function spell5_21694(pUnit, Event) --@Poison Bolt,n/a--
pUnit:FullCastSpellOnTarget(37862,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21694', 10000, 1)
end

function spell6_21694(pUnit, Event) --@Trample,Self--
pUnit:FullCastSpellOnTarget(40340,pUnit)
pUnit:RegisterEvent('Sorts_21694', 592, 1)
end

function Sorts_21694(pUnit, Event)
local choix_sorts_21694 = math.random(0, 6)
if choix_sorts_21694 == 0 then
pUnit:RegisterEvent('spell0_21694', 1, 1)
end
if choix_sorts_21694 == 1 then
pUnit:RegisterEvent('spell1_21694', 1, 1)
end
if choix_sorts_21694 == 2 then
pUnit:RegisterEvent('spell2_21694', 1, 1)
end
if choix_sorts_21694 == 3 then
pUnit:RegisterEvent('spell3_21694', 1, 1)
end
if choix_sorts_21694 == 4 then
pUnit:RegisterEvent('spell4_21694', 1, 1)
end
if choix_sorts_21694 == 5 then
pUnit:RegisterEvent('spell5_21694', 1, 1)
end
if choix_sorts_21694 == 6 then
pUnit:RegisterEvent('spell6_21694', 1, 1)
end
end

function mob21694_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21694', math.random(1500, 3000), 1)
end

function mob21694_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21694_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21694_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21694, 1, 'mob21694_Action')
RegisterUnitEvent(21694, 2, 'mob21694_Leave')
RegisterUnitEvent(21694, 3, 'mob21694_Kill')
RegisterUnitEvent(21694, 4, 'mob21694_Die')
